<html>
	<head>
		<title></title>
		<link rel="stylesheet" href="style.css">	
	</head>
	<body>
		<table>
			<tr>
				<td colspan="2" id="pageheader">
					health information system
				</td>
			</tr>
			<tr>
				<td id="mainnav">
					<div class="menuitem">location</div>
					<div class="menuitem">opd cases</div>
					<div class="menuitem">health promotion</div>
					<div class="menuitem">nutrition</div>
					<div class="menuitem">child welfare</div>
					<div class="menuitem">family planning</div>
				</td>
				<td id="content">
					<div id="divPageMenu">
						<span class="menuitem" >sub districts</span>
						<span class="menuitem" >communities</span>
						<span class="menuitem" >view map</span>
						<input type="text" id="txtSearch">
						<span class="menuitem">search</span>		
					</div>
					<div id="divStatus" class="status">
		
					</div>
					<div id="divContent">
						Edit Vaccine
<?php
	include("vaccines.php");
	if(!isset($_REQUEST['id'])){
		echo " no id";
		exit();
	}
	$vid=$_REQUEST['id'];
	$obj=new vaccines();
	if(isset($_REQUEST['vaccine_name'])){
		$vaccine_name=$_REQUEST['vaccine_name'];
		$schedule=$_REQUEST['schedule'];
		$url=$_REQUEST['vaccine_url'];
		$obj->update_vaccine($vaccine_name,$scheulde,$url);
	}
	
	$row=$obj->get_vaccine($vid);
	
?>
		<form action="vaccine_edit.php" method="GET" >
			<table class="tableForm" >
					<tr>
						<td class="label">Vaccine Name: </td>
						<td class="field"><input type="text" value="<?php echo $row['vaccine_name'] ?>" name="vaccine_name" ></td>
					</tr>
					<tr>
                                       
                                            <td class="label">Schedule:</td>
                                        
						<td class="field"><input type="text" value="<?php echo $row['schedule'] ?>" name="schedule" >
						</td>
					</tr>
					<tr>
						<td class="label">URL :</td>
						<td class="field"><input type="text" value="<?php echo $row['url'] ?>" name="vaccine_url" >
						</td>
					</tr>
					<tr>
						<td class="label"></td>
						<td class="field">
							<input type="submit" value="save" name="submit" >
						</td>
					</tr>
			</table>
				
			<input type="hidden" value="<?php echo $vid ?>" name="id" >
		</form>

	</body>
</html>	